# Maintainer: Jelle van der Waa <jelle@archlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=python-flask-talisman
_pyname=${pkgname/python-/}
pkgver=0.7.0
pkgrel=5
pkgdesc='HTTP security headers for Flask'
url='https://github.com/GoogleCloudPlatform/flask-talisman'
arch=('any')
license=('APACHE')
depends=('python-flask' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(https://github.com/GoogleCloudPlatform/flask-talisman/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('b34cd6c61bd8417ef6ac9628d0768e43505dbb5e07b11efd913a17d5ac5394ad')

build() {
  cd ${_pyname}-${pkgver}
  python setup.py build
}

check() {
  cd ${_pyname}-${pkgver}
  pytest flask_talisman
}

package() {
  cd ${_pyname}-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
